/** 画笔状态 */
export type PaintStatus = 'none' | 'dragCanvas'

/** 类配置 */
export interface DmpImgPaintOptions {
  /** 旋转角度 */
  angle?: number
}

export interface PaintResizeOptions {
  w?: number
  h?: number
}

export type Point = { x: number; y: number }

export type MarkType = 'rect' | 'circle' | 'line'
/**
 * 标注信息，通过此信息可生成标注对象
 */
export interface MarkInfoBase {
  uid: string
  color: string
}
export interface MarkInfoRect extends MarkInfoBase {
  type: 'rect'
  points: Point[]
}
export interface MarkInfoOther extends MarkInfoBase {
  type: Exclude<MarkType, 'rect'>
  points: number[][] // 这里假设非 'rect' 类型的 points 是 number[][]
}
export type MarkInfo = MarkInfoRect | MarkInfoOther

/**
 * 标注对象
 */
export interface MarkObj extends fabric.Object {
  uid: string
  markTagInfo?: any
  direction?: string
  tlCoordXy?: any[]
}
